<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <script src="./lib/vue.js"></script>
    <title>Document</title>
</head>
<body>
    <div id="app">
        <p>{{msg}}</p> 
        <h5>注册账户</h5>
        <button v-on:click="handerclick"><h1>单击按钮1</h1></button>
        <button @click="handerclick"><h1>单击按钮2</h1></button>
        <h5>选择爱好</h5> 
        <select v-on:change="handerchange">
            <option value="red">瑜伽</option>
            <option value="yellow">读书</option>
            <option value="bule">游泳</option>
        </select>
        <h5>表单提交</h5>
        <form v-on:submit.prevent="handersubmit">
            <input type="checkbox" v-on:click="handerDisabled"/>
            <button :disabled="isDisabled">提交</button>
        </form>
    </div>
</body>
<script>
    var vm = new Vue({
        el:"#app",
            data:{ 
                msg:"全村的希望",
                isDisabled:true
            },
            methods:{
                handerclick:function(){
                    console.log("点击了");
                },
                handerchange:function(){
                    console.log(event.target.value);
                },
                handersubmit:function(){
                    console.log("触发事件");
                },
                handerDisabled:function(event){
                    console.log(event.target.checkde);
                    if(event.target.checkde==ture){
                        this.isDisabled=false;

                    }else{
                        this.isDisabled=ture;

                    }

                }
            }
           
        
    })
</script>
</html>